package edu.whu.assignment8.service;

import edu.whu.assignment8.entity.Goods;
import edu.whu.assignment8.exception.GoodsAdminException;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import javax.validation.constraints.NotNull;
import java.util.Map;

public interface GoodsService {
    Goods addGoods(Goods goods) throws GoodsAdminException;
    Goods getGoods(long id);
    Page<Goods> findGoods(@NotNull Map<String, Object> condition, @NotNull Pageable pageable);
    void updateGoods(long id, Goods goods) throws GoodsAdminException;
    void deleteGoods(long id);
}
